#pragma once
#include "data.h"
#include "coords.h"
#include "stdafx.h"

class CArray3D :
	public CData
{
public:
				CArray3D(int xsize, int ysize, int zsize);
				~CArray3D(void);
	int&		operator() (int x, int y, int z);
	const int&	operator() (int x, int y, int z) const;

	inline int	getXsize(void) { return xs; }
	inline int	getYsize(void) { return ys; }
	inline int	getZsize(void) { return zs; }
	PCoords		getSize(void) { return make_shared<CCoords>(xs,ys,zs); };

	class BadSize { };
	class BoundsViolations { };
private:
	int*** arr3D;
	const int xs,ys,zs;
	mutable int bViol;
};

typedef shared_ptr<CArray3D> PArray3D;
